package com.zatech.cgnci.project.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 审批流程发起表
 * </p>
 *
 * @author Generator
 * @since 2024-12-17
 */
@Data
@Accessors(chain = true)
@TableName("cgnci_approval_info")
@ApiModel(value = "CgnciApprovalInfoDO对象", description = "审批流程发起表")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CgnciApprovalInfoDO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("approval_info_id")
    @TableId(value = "approval_info_id", type = IdType.ASSIGN_ID)
    private Long approvalInfoId;

    @ApiModelProperty("任务号")
    private String taskId;

    @ApiModelProperty("工作台类型(1-个人工作台,2-其他)")
    private Integer approvalConfigGroupType;

    @ApiModelProperty("规则表的groupID")
    private String approvalConfigGroupId;

    @ApiModelProperty("表单编号 关联业务编号")
    private String formNo;

    @ApiModelProperty("表单ID 关联业务ID")
    private String formId;

    @ApiModelProperty("业务名称")
    private String businessName;

    @ApiModelProperty("发起人id")
    private String founderId;

    @ApiModelProperty("发起人姓名")
    private String founderName;

    @ApiModelProperty("发起时间")
    private Date launchTime;

    @ApiModelProperty("代理人工号-名称")
    private String currentAgentAndName;

    @ApiModelProperty("流程是否结束(0-否，1-是)")
    private Integer isEnd;

    @ApiModelProperty("流程结束时间")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Date endTime;

    @ApiModelProperty("用来记录整个流程进行到那个节点")
    private Integer approvalNode;

    @ApiModelProperty("记录历史经历节点,英文逗号分隔0,1,2,1,2,3 最后一个值和当前节点同步")
    private String recordNodeHistory;

    @ApiModelProperty("任务类型")
    private String taskType;

    @ApiModelProperty("任务类型编码")
    private String taskTypeCode;

    @ApiModelProperty("流程名称")
    private String processName;

    @ApiModelProperty("当前处理人节点")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String currentApproverNode;

/*    @ApiModelProperty("当前处理人")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String currentApprover;

    @ApiModelProperty("当前处理人名字")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String currentApproverName;*/

    @ApiModelProperty("当前处理人工号-姓名")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String currentApproverAndName;

    @ApiModelProperty("上一环节处理人节点")
    private String previousApproverNode;

/*    @ApiModelProperty("上一环节处理人")
    private String previousApprover;

    @ApiModelProperty("上一环节处理人名字")
    private String previousApproverName;*/

    @ApiModelProperty("上一环节处理人工号-名称")
    private String previousApproverAndName;

    @ApiModelProperty("任务状态(0:录入中,1:审核中,2:退回录入中,3:已完成,4:已注销,5:作废申请中,6:作废审核中,7:已作废),码表值:businessStatus")
    private String status;

    @ApiModelProperty("重定向地址url")
    private String redirectionUrl;

    @ApiModelProperty("重定向地址参数")
    private String redirectionParam;

    @ApiModelProperty("重定向地址描述")
    private String redirectionDesc;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("更新时间")
    @TableField(update = "now()")
    private Date updateTime;


}
